package com.ruoyi.quartz.task;

import com.ruoyi.stock.service.IStockBasicService;
import lombok.extern.slf4j.Slf4j;
import org.python.core.PyObject;
import org.python.util.PythonInterpreter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Component;

/** 股票列表同步任务 */
@Component("stockOtherTask")
@Slf4j
public class StockOtherTask {

  @Autowired private IStockBasicService stockBasicService;

  @Autowired private MongoTemplate mongoTemplate;

  private static final String COLLECTION_NAME = "stockBasic";

  public void run() {}

  public static void main(String[] args) {
    String py = "";
    PythonInterpreter interpreter = new PythonInterpreter();
    interpreter.exec("a='hello world'; ");
    interpreter.exec("print a; ");
    PyObject eval = interpreter.eval("a='132';");
    System.out.println(eval);
    //        pythonInterpreter.execfile();

  }
}
